package Calcu;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class CreateFracQuestionTest {
<<<<<<< HEAD
	static int[] fa1=Fraction.createFraction();
	static int[] fa2=Fraction.createFraction();
=======
	static int[] fa1={0,2};
	static int[] fa2={3,4};
>>>>>>> 2823465da974285a8e35cea595a73431cb0b49ce
	static String[] arr={"分子","分母"};
	int gbs=Fraction.LCM(fa1[1],fa2[1]);

	@Before
	public void setUp() throws Exception {
		
	}

	@After
	public void tearDown() throws Exception {
		
	}

	@Test
	public void testAdd() {
		arr=CreateFracQuestion.add(fa1, fa2, gbs);
		System.out.println("加法： "+arr[0]+" "+arr[1]);
	}

	@Test
	public void testSub() {
		arr=CreateFracQuestion.sub(fa1, fa2, gbs);
		System.out.println("减法： "+arr[0]+" "+arr[1]);
	}

	@Test
	public void testMul() {
		arr=CreateFracQuestion.mul(fa1, fa2, gbs);
		System.out.println("乘法： "+arr[0]+" "+arr[1]);
	}

	@Test
	public void testDiv() {
		arr=CreateFracQuestion.div(fa1, fa2, gbs);
		System.out.println("除法： "+arr[0]+" "+arr[1]);
	}

}
